package com.zhiling.www.entity;

import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 股票实体类
 */
@Table(name = "stock_list")
public class Stock {

    @Id
    @KeySql(useGeneratedKeys = true)
    private String stockCode;//股票代码
    private String stockName;//股票名称
    private Double openprice;//开盘价
    private Double nowprice;//当前价
    private Double diffRate;//涨跌幅度
    private Double diffMoney;//涨跌金额
    private Integer tradenum;//成交量(股，不是手)
    private Double tradeamount;//成交金额（万元）
    private Double todaymax;//今日最高价
    private Double todaymin;//今日最高价今日最低价
    private Double rise;//涨停价
    private Double fall;//跌停价

    public Stock() {
    }

    public Stock(String stockCode, String stockName, Double openprice, Double nowprice, Double diffRate, Double diffMoney, Integer tradenum, Double tradeamount, Double todaymax, Double todaymin, Double rise, Double fall) {
        this.stockCode = stockCode;
        this.stockName = stockName;
        this.openprice = openprice;
        this.nowprice = nowprice;
        this.diffRate = diffRate;
        this.diffMoney = diffMoney;
        this.tradenum = tradenum;
        this.tradeamount = tradeamount;
        this.todaymax = todaymax;
        this.todaymin = todaymin;
        this.rise = rise;
        this.fall = fall;
    }

    public String getStockCode() {
        return stockCode;
    }

    public void setStockCode(String stockCode) {
        this.stockCode = stockCode;
    }

    public String getStockName() {
        return stockName;
    }

    public void setStockName(String stockName) {
        this.stockName = stockName;
    }

    public Double getOpenprice() {
        return openprice;
    }

    public void setOpenprice(Double openprice) {
        this.openprice = openprice;
    }

    public Double getNowprice() {
        return nowprice;
    }

    public void setNowprice(Double nowprice) {
        this.nowprice = nowprice;
    }

    public Double getDiffRate() {
        return diffRate;
    }

    public void setDiffRate(Double diffRate) {
        this.diffRate = diffRate;
    }

    public Double getDiffMoney() {
        return diffMoney;
    }

    public void setDiffMoney(Double diffMoney) {
        this.diffMoney = diffMoney;
    }

    public Integer getTradenum() {
        return tradenum;
    }

    public void setTradenum(Integer tradenum) {
        this.tradenum = tradenum;
    }

    public Double getTradeamount() {
        return tradeamount;
    }

    public void setTradeamount(Double tradeamount) {
        this.tradeamount = tradeamount;
    }

    public Double getTodaymax() {
        return todaymax;
    }

    public void setTodaymax(Double todaymax) {
        this.todaymax = todaymax;
    }

    public Double getTodaymin() {
        return todaymin;
    }

    public void setTodaymin(Double todaymin) {
        this.todaymin = todaymin;
    }

    public Double getRise() {
        return rise;
    }

    public void setRise(Double rise) {
        this.rise = rise;
    }

    public Double getFall() {
        return fall;
    }

    public void setFall(Double fall) {
        this.fall = fall;
    }

    @Override
    public String toString() {
        return "Stock{" +
                "stockCode='" + stockCode + '\'' +
                ", stockName='" + stockName + '\'' +
                ", openprice=" + openprice +
                ", nowprice=" + nowprice +
                ", diffRate=" + diffRate +
                ", diffMoney=" + diffMoney +
                ", tradenum=" + tradenum +
                ", tradeamount=" + tradeamount +
                ", todaymax=" + todaymax +
                ", todaymin=" + todaymin +
                ", rise=" + rise +
                ", fall=" + fall +
                '}';
    }
}
